#ifndef __20076183_CHRONO_HH__
#define __20076183_CHRONO_HH__

#include <sys/timeb.h>

//!  The class Chrono - compute a simple delay time between two time points
/*!
  This class provides a simple chrono. It is able to compute the number of milisecondes between two time points.
  Only three methods are available - start() , stop(), and time_ms().
*/

class Chrono
{
    protected:

        //! Attribute chrono_beg(timeb);
        /*! This attribute is the starting point of the chrono */
        timeb chrono_beg;

        //! Attribute chrono_end(timeb);
        /*! This attribute is the ending point of the chrono */
        timeb chrono_end;

    public:

        //! Default constructor;
        /*! This constructor initializes attributes default. */
        Chrono();

        //! Default destructor;
        /*! Destructor, does nothing special. */
        virtual ~Chrono();

        //! Copy constructor;
        /*! This constructor copies all attributes (members) of the Object Chrono. */
        Chrono(const Chrono &);

        //! Equality operator;
        /*! This operator '=' copies all attributes (members) of the Object Chrono, and return a reference of its. */
        Chrono& operator=(const Chrono &);


        //! Method start
        /*! This method set the starting time point when the function start() is called. */
        void start();

        //! Method stop
        /*! This method set the ending time point when the function stop() is called. */
        void stop();

        //! Method time_ms()
        /*! This method return the difference,in ms between the starting and the ending time point. */
        unsigned int time_ms() const;
};

#endif
